class_name Mouse extends Node2D

@onready var up_left = $RectUpLeft
@onready var up_right = $RectUpRight
@onready var down_left = $RectDownLeft
@onready var down_right = $RectDownRight

@onready var mouse_sprite = $MouseSprite

@export var mouse_normal_texture : Texture2D
@export var mouse_using_weapon_texture : Texture2D

@export var color_normal : Color
@export var color_error : Color

enum STATE{NORMAL=1, USING_WEAPON=2, POINT_MAP=3}
var current_state:STATE

var _map_point_check_result : AreaCheckResult

func _ready():
	top_level = true
	Input.mouse_mode = Input.MOUSE_MODE_HIDDEN
	to_normal()
	
#转换为普通鼠标模式
func to_normal():
	current_state = STATE.NORMAL
	_hide_point()
	mouse_sprite.texture = mouse_normal_texture
	mouse_sprite.show()
	_map_point_check_result = null

func _show_point():
	up_left.show()
	up_right.show()
	down_left.show()
	down_right.show()

func _hide_point():
	queue_redraw()
	up_left.hide()
	up_right.hide()
	down_left.hide()
	down_right.hide()
